package com.dhj.jvmstudy.chapter04;

/**
 * 演示StackOverFlowError错误
 */
public class StackOverFlowTest {
    /**
     * Exception in thread "main" java.lang.StackOverflowError
     * 	at com.dhj.jvmstudy.chapter04.StackOverFlowTest.main(StackOverFlowTest.java:8)
     * 	at com.dhj.jvmstudy.chapter04.StackOverFlowTest.main(StackOverFlowTest.java:8)
     * 	at com.dhj.jvmstudy.chapter04.StackOverFlowTest.main(StackOverFlowTest.java:8)
     * 	at com.dhj.jvmstudy.chapter04.StackOverFlowTest.main(StackOverFlowTest.java:8)
     */

    private static int count = 1;

    public static void main(String[] args) {
        System.out.println(count++);
        // 之前 9825
        // -Xss256k 之后 2241
        main(args);
    }

}
